import h from "./dom/h"
import patch from "./dom/patch"
//获取到真实DOM
let container = document.getElementById("container")
let btn = document.getElementById("btn")
//新的没有子节点
// let vnode1 = h("div",{},"aaaaaaa")
//新的有子节点
let vnode1 = h( 'ul',0,[
	h( 'li',{key:"a"},'a'),	
	h( 'li',{key:"b"},'b'),
	h( 'li',{key:"c"},'c'),
	h( 'li',{key:"d"},'d')
	h( 'li',{key:"d"},'e')
]);
patch(container,vnode1)
let vnode2 = h( 'ul',0,[
	h( 'li',{},'c'),
	h( 'li',{},'b'),
	h( 'li',{},'e'),
	h( 'li' ,{},'a'),
	h( 'li',{},'d')		
]);
btn.onclick = function(){
	patch(vnode1,vnode2)
}


